home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gcore / sun4.md / gcore.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-06  |  1.9 KB  |  80 lines

  1. /*
  2.  * gcore.h --
  3.  *
  4.  *    Interfile declartions for the gcore program.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /a/newcmds/gcore/RCS/gcore.h,v 1.1 89/02/05 20:50:58 mendel Exp Locker: mendel $ SPRI
  16. TE (Berkeley)
  17.  */
  18.  
  19. #ifndef _GCORE_H
  20. #define _GCORE_H
  21.  
  22. /*
  23.  * Program name used in error messages.
  24.  */
  25. #define    PROGRAM_NAME    "gcore"
  26.  
  27. /*
  28.  * MAX_ARG_STRING_SIZE - Maximum size of a argument string as return 
  29.  *              by FindProcess.
  30.  */
  31. #define    MAX_ARG_STRING_SIZE    1024
  32.  
  33. /*
  34.  * Number of and index assignments in to the segSize array return by 
  35.  * FindProcess.
  36.  */
  37. #define    TEXT_SEG    0
  38. #define    DATA_SEG    1
  39. #define    STACK_SEG    2
  40. #define    NUM_SEGMENTS    3
  41.  
  42.  
  43. /*
  44.  * Sig mask state as returned by FindProcess.
  45.  */
  46.  
  47. #define    SIG_IGNORING 1
  48. #define    SIG_HANDLING 2
  49. #define    SIG_HOLDING  4
  50.  
  51. extern Boolean debug;
  52.  
  53. #include <sys/core.h>
  54.  
  55. /*
  56.  * Possible states return by FindProcess.
  57.  */
  58. #define    NOT_FOUND_STATE    0    /* Could find the process. */
  59. #define    DEBUG_STATE    1    /* Process is in the debug state. */
  60. #define    SUSPEND_STATE    2    /* Process is in the suspend state. */
  61. #define    WAIT_STATE    3    /* Process is in the wait state. */
  62. #define    RUN_STATE    4    /* Process is in the run state. */
  63. #define    UNKNOWN_STATE    5    /* Process in the unknown state. */
  64.  
  65. #define    STATE_NAMES    {\
  66.     "Not found", "Debug", "Suspended", "Wait", "Running", "Unknown"}
  67.  
  68. /*
  69.  * Routine exported from modules.
  70.  */
  71.  
  72. Boolean    AttachProcess();
  73. Boolean DetachProcess();
  74. Boolean ReadStopInfoFromProcess();
  75. int XferSegmentFromProcess();
  76. int FindProcessStatus();
  77. void GetSigMask();
  78.  
  79. #endif
  80.